"use client";
import { useLayoutEffect } from 'react';

interface LoadingProviderProps {
  children: React.ReactNode;
}

export default function LoadingProvider({ children }: LoadingProviderProps) {
  useLayoutEffect(() => {
    // 在客户端渲染完成后添加loaded类
    const timer = setTimeout(() => {
      document.body.classList.add('loaded');
    }, 100);

    return () => clearTimeout(timer);
  }, []);

  return <>{children}</>;
} 